home *** CD-ROM | disk | FTP | other *** search
- Path: sunsite.doc.ic.ac.uk!qmw!odin
- From: odin@dcs.qmw.ac.uk (Andrew George Elia)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Executing like Workbench
- Date: 2 Apr 1996 14:10:51 GMT
- Organization: Queen Mary & Westfield College, London, UK
- Message-ID: <4jrchb$s7l@epsilon.qmw.ac.uk>
- NNTP-Posting-Host: dannii-main.dcs.qmw.ac.uk
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hi,
- Here's a teaser for you. I've recently had the idea of developing
- a tool that would be runnable from CLI, and would convert all command
- line arguments into a Workbench arguments list to execute as if it had
- been run from Workbench. Basically, the conversion bit seems OK, I just
- need to know how to make a program behave as if it had been called from
- Workbench rather than the CLI. This would mean calling CreateProc, and
- providing a message for the program to answer etc.
-
- You may ask why I'd like to write a program like this. Well, some
- time ago I wrote a program called AutoAppMenu (it's in util/app on the
- Aminet, as well as an Amiga Format subs disc). It just does a WBStartUp
- type thing of reading the contents of the directory, and then using
- AddAppMenuItemA to add them to the Tools menu so that you can run your
- programs straight away. I use it myself quite regularly, although there
- is something rather annoying about it. It deals with everything solely
- through the command line. So what will happen is that if you were to run
- Devpac, after clicking on three items of source code, Devpac would have
- those programs (full paths) passed to it through the command line which
- is fair enough. On the other hand, it does have some disadvantages.
- Programs such as Wordworth will look in the current directory (which will
- default to WBStartUp with AutoAppMenu) and thus not find anything. Deluxe
- Paint will not parse it's tool types, and therefore will shut down the
- Workbench whenever I load it. My idea is to write a program that will
- take a series of command line arguments (namely icons that have been
- clicked) and then convert that lot to make it look like a program has
- been double-clicked with all those icons. It would also have tool types
- specifying the default directory to point to. All that should be easy...
- I hope.
-
- By the way, if you feel like sending me some source code,
- I'll accept assembly language, C, C++, or AMOS. Thanks!
-
- Andy E.
- --
- ------------------------------------------------------------------------
- //
- // What they conquer through ignorance, we conquer through knowledge
- \X/
- ------------------------------------------------------------------------
- E-Mail: odin@dcs.qmw.ac.uk | Web: http://www.dcs.qmw.ac.uk/~odin
- ------------------------------------------------------------------------
-